<?php
namespace app\admin\model;
use \think\facade\View;
use \think\facade\Request;
use think\Model;
class Category extends model
{
    public static function getCategory()
    {
        return self::where('parentid',0)->select();
    }
    public static function  getCate()
    {
        $pid=input('id',0);
        return self::order('sort')
            ->where('parentid',$pid)
            ->select();
    }
}